package com.zf.yichat.service;

import com.zf.yichat.model.UserBank;
import com.zf.yichat.utils.HJpay.com.sdk.entity.Response;
import com.zf.yichat.utils.HJpay.com.sdk.entity.WithdrawResponse;
import com.zf.yichat.utils.response.FsResponse;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.Map;

/**
 * 汇聚支付
 */
public interface PayService {
    FsResponse xspayGetAccount();

    FsResponse xspayGetUserAccount(String xspayUserId, Integer count);

    Map<String, String> weixinPrePay(Long userId, Integer tradeType, BigDecimal money);

    String payNotify(String rexXml);

    String alipayPre(Long userId, Integer tradeType, BigDecimal money);

//    String alipayNotufy(HttpServletRequest res) throws UnsupportedEncodingException;

//    FsResponse unionpayPre(String orderCode, Long userId, Integer tradeType, BigDecimal money);

//    FsResponse xspayOpenAccount(Long userId, Integer bankId);

    FsResponse hjPayBindCardPre(Long userId, UserBank bank);
    FsResponse sandBindCard(Long userId, UserBank bank);
    FsResponse bindCardUu(Long userId, UserBank bank);

    FsResponse hjPayBindCardConfirm(String orderCode, String ncountOrderId, String smsCode);

    FsResponse hjPayPre(String orderCode, Long userId, Integer tradeType, BigDecimal money, Integer bankId);

    FsResponse hjPayConfirm(String orderCode, String ncountOrderId, String smsCode);

    FsResponse sandWithDraw(Integer id, Long userId, String bankNumber, BigDecimal money);
    FsResponse hjPayWithDraw2(Integer id, Long userId, String bankNumber, BigDecimal money);

    void hjpayWithdrawNotify(WithdrawResponse req);

    FsResponse xspayUserTrans(String xsuserId, BigDecimal money);

//    FsResponse unionpayPre2(String orderCode, Integer userId, Integer tradeType, BigDecimal money);
//
//    FsResponse unionpayOpenStatus(String orderCode, String accNo);
//
//    FsResponse unionpaySms(String orderCode, String phoneNo, String accNo);
//
//    FsResponse unionpayConsume(String orderCode, String accNo, String smsCode);
//
//    void unionpayNotify(HttpServletRequest res, HttpServletResponse resp) throws IOException;

    void hjPayNotify(Response res, HttpServletResponse resp) throws Exception;

//    boolean unionpayValidateAppResponse(String jsonData, String encoding);

    FsResponse transferAlipayAccount(String appOrderNO, String account, BigDecimal money);

//    void unionpayOpenCardFront(String orderCode, String accNo, String phoneNo, HttpServletResponse response) throws IOException;
     FsResponse sandPayApply(  Long userId, BigDecimal money ,String title);
    FsResponse payconfig(  );
    FsResponse huifuPayApply(  Long userId, BigDecimal money ,String title);
    FsResponse sandPayApplyH5(  Long userId, BigDecimal money,String clientIp );
    FsResponse sandPayCallBack(HttpServletRequest request, HttpServletResponse response);
    FsResponse huifuPayCallBack(HttpServletRequest request, HttpServletResponse response);

    /**
     * 绑定支付宝
     * @param userId
     * @param bank
     * @return
     */
    FsResponse bindCardAliPay(Long userId, UserBank bank);

    /**
     * 绑定微信支付
     * @param userId
     * @param bank
     * @return
     */
    FsResponse bindCardWeChatPay(Long userId, UserBank bank);
}
